<?=$this->load->view('include_header',null)?>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				<?php if(!empty($info->id)):?><li><a id="printInfo" class="folder_table">打印本页信息</a></li><?php endif;?>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
<!-- table begin -->
<form method="post" id="form"  enctype="multipart/form-data" action="<?=site_url('schengen/fr_update/'.$cateid)?>">

	<h3>法国申根表</h3>
    <table width="100%">
    <thead>
        <tr>
          <td colspan="4" align="right"><img src="<?= (@$info->avatar)?@$info->avatar:'images/avatar.gif'?>" width="150" height="150" /></td>
		  <td align="right">
		  上传照片<br />
		  <input type="file" name="userphoto" /><br />
		  (.gif|.jpg|.png文件,最大1M)<br />
		  <?php if (@$info->attachment):?><a href="<?= @$info->attachment?>" target="_blank">点击下载附件</a><?php endif; ?>
		  &nbsp;&nbsp;&nbsp;&nbsp;上传附件<br />
		  <input type="file" name="userfile" /><br />
		  (.pdf|.zip|.rar|.doc,最大2M)		  
		  </td>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="5" align="right">			
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息" />
			<input id="button2" type="reset" value="重置" />
			</td>
        </tr>
    </tfoot>

    <tbody>
        <tr class="odd">
            <td>Surname (Family name) (姓)</td>
            <td><input type="text" name="surname" value="<?= @$info->surname?>" /></td>
            <td>&nbsp;</td>
            <td>Surname at birth (Former family name)(出生时姓氏) </td>
            <td><input type="text" name="former" value="<?= @$info->former?>" /></td>
        </tr>
        <tr class="even">
            <td>First name (Given name) (名)</td>
            <td><input type="text" name="firstname" value="<?= @$info->firstname?>" /></td>
            <td>&nbsp;</td>
            <td>Date of birth (day-month-year)(出生日期 (日-月-年))</td>
            <td>
			<select name="birth_d"><?php for($i=1;$i<=31;$i++) echo "<option value='$i'".((@$info->birth_d==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="birth_m"><?php for($i=1;$i<=12;$i++) echo "<option value='$i'".((@$info->birth_m==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="birth_y"><?php for($i=2011;$i>1940;$i--) echo "<option value='$i'".((@$info->birth_y==$i)?"selected":"").">$i</option>"; ?></select>
			</td>
        </tr>
        <tr class="odd">
            <td>Place of birth / 出生地</td>
            <td><input type="text" name="birth_place" value="<?= @$info->birth_place?>" /></td>
            <td>&nbsp;</td>
            <td>Country of birth / 出生国 </td>
            <td><input type="text" name="birth_country" value="<?= @$info->birth_country?>" /></td>
        </tr>
        <tr class="even">
            <td>Current nationality / 现国籍</td>
            <td><input type="text" name="nationality" value="<?= @$info->nationality?>" /></td>
            <td>&nbsp;</td>
            <td>Sex / 性别</td>
            <td><input type="radio" name="sex" value="1" <?= (@$info->sex==1)?'checked':''?> />Male / 男 <input type="radio" name="sex" value="2" <?= (@$info->sex==2)?'checked':''?> />Female / 女</td>
        </tr>
        <tr class="odd">
            <td>Marital status / 婚姻状况</td>
            <td colspan="4">
			<input type="radio" name="marital_status" value="1" <?= (@$info->marital_status==1)?'checked':''?>/> Single / 未婚  &nbsp;&nbsp;
			<input type="radio" name="marital_status" value="2" <?= (@$info->marital_status==2)?'checked':''?>/> Married / 已婚<br />
            <input type="radio" name="marital_status" value="3" <?= (@$info->marital_status==3)?'checked':''?>/> Separated / 分居 <input type="radio" name="marital_status" value="4" <?= (@$info->marital_status==4)?'checked':''?>/> Divorced / 离异 <input type="radio" name="marital_status" value="5" <?= (@$info->marital_status==5)?'checked':''?>/> Widow (er) / 丧偶<br />
            <input type="radio" name="marital_status" value="0" <?= (@$info->marital_status==0)?'checked':''?>/> Other / 其它<input type="text" name="marital_status_other" value="<?= @$info->marital_status_other?>" /></td>
        </tr>
        <tr class="even">
          <td colspan="5">In the case of minors: Surname, first name, address (if different from applicant’s) and nationality of parental authority / legal guardian /<br />未成年申请人 须填上合法监护人的姓名、住址(如与申请人不同) 、及国籍<br />
              Surname<input type="text" name="guardian_surname" value="<?= @$info->guardian_surname?>" /> 
			  First name<input type="text" name="guardian_firstname" value="<?= @$info->guardian_firstname?>" /> <br />
			  Address<input name="guardian_address" type="text" size="50" value="<?= @$info->guardian_address?>" /> 
			  Nationality<input type="text" name="guardian_nationality" value="<?= @$info->guardian_nationality?>"/> 
			  </td>
        </tr>
        <tr class="odd">
            <td colspan="2">National identity number, where applicable/身份证号码，如适用</td>
            <td colspan="3"><input type="text" name="national_id" value="<?= @$info->national_id?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="2">Type of travel document /护照种类</td>
            <td colspan="3">
            <input type="radio" name="travel_document_type" value="1" <?= (@$info->travel_document_type==1)?'checked':''?>/> Ordinary passport / 普通护照 <br />
            <input type="radio" name="travel_document_type" value="2" <?= (@$info->travel_document_type==2)?'checked':''?>/> Diplomatic passport / 外交护照<br />
            <input type="radio" name="travel_document_type" value="3" <?= (@$info->travel_document_type==3)?'checked':''?>/> Service passport / 公务护照 <br />
            <input type="radio" name="travel_document_type" value="4" <?= (@$info->travel_document_type==4)?'checked':''?>/> Official passport / 因公护照 <br />
            <input type="radio" name="travel_document_type" value="5" <?= (@$info->travel_document_type==5)?'checked':''?>/> Special passport / 特殊护照<br />
            <input type="radio" name="travel_document_type" value="0" <?= (@$info->travel_document_type==0)?'checked':''?>/> Other (please specify) / 其它旅行证件（请注明）：<input type="text" name="travel_document_type_other" value="<?= @$info->travel_document_type_other?>" /></td>
        </tr>
        <tr class="odd">
            <td>Number of travel document 旅行证件编号</td>
            <td><input type="text" name="travel_document_num" value="<?= @$info->travel_document_num?>" /></td>
            <td>&nbsp;</td>
            <td>Date of issue 签发日期</td>
            <td><input type="text" name="travel_document_issue_date" value="<?= @$info->travel_document_issue_date?>" id="travel_document_issue_date" /></td>
        </tr>
        <tr class="even">
            <td>Valid until 有效期至</td>
            <td><input type="text" name="travel_document_valid_date" value="<?= @$info->travel_document_valid_date?>" id="travel_document_valid_date"/></td>
            <td>&nbsp;</td>
            <td>Issued by 签发机关</td>
            <td><input type="text" name="travel_document_issue_by" value="<?= @$info->travel_document_issue_by?>"/></td>
        </tr>
		        <tr class="odd">
            <td>Applicant’s home address 申请人住址</td>
            <td colspan="4"><input name="applicant_address" type="text" size="50" value="<?= @$info->applicant_address?>" /></td>
        </tr>
        <tr class="even">
            <td>Applicant’s e-mail address 申请人电子邮件</td>
            <td><input type="text" name="applicant_email" value="<?= @$info->applicant_email?>" id="applicant_email" /></td>
            <td>&nbsp;</td>
            <td>Telephone number 电话号码</td>
            <td><input type="text" name="applicant_telephone" value="<?= @$info->applicant_telephone?>" /></td>
        </tr>		
        <tr class="odd">
            <td colspan="2">Residence in a country other than the country of current nationality <br />是否居住在现时国籍以外的国家</td>
            <td colspan="3">
			<input type="radio" name="is_residence" value="0" <?= (@$info->is_residence==0)?'checked':''?>/> No 否<br />
            <input type="radio" name="is_residence" value="1" <?= (@$info->is_residence==1)?'checked':''?>/> Yes. <br />
			&nbsp;&nbsp;Residence permit or equivalent<input type="text" name="residence_other" value="<?= @$info->residence_other?>" /> <br />
			&nbsp;&nbsp;No.<input type="text" name="residence_other_num" value="<?= @$info->residence_other_num?>" /> <br />
			&nbsp;&nbsp;Valid until<input type="text" name="residence_other_valid_date" value="<?= @$info->residence_other_valid_date?>" id="residence_other_valid_date" /></td>
        </tr>
        <tr class="even">
            <td>Current occupation 现职业</td>
            <td><input type="text" name="occupation" value="<?= @$info->occupation?>"/></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr class="odd">
            <td colspan="2">
            Employer and employer’s address and telephone number. <br>
            For students, name and address of educational establishment.<br>
            工作单位名称，地址和电话，学生填写学校名称及地址</td>
            <td colspan="3">
            name<input type="text" name="employer_name" value="<?= @$info->employer_name?>" /><br />
			address<input type="text" name="employer_address" value="<?= @$info->employer_address?>" /><br />
			telephone<input type="text" name="employer_telephone" value="<?= @$info->employer_telephone?>" /><br />			</td>
        </tr>
        <tr class="even">
            <td>Main purpose(s) of the journey: <br>
            旅程主要目的</td>
            <td colspan="4">
			<input type="radio" name="journey_purpose" value="1" <?= (@$info->journey_purpose==1)?'checked':''?>/> Tourism / 旅游 
			<input type="radio" name="journey_purpose" value="2" <?= (@$info->journey_purpose==2)?'checked':''?>/> Business / 商务 
			<input type="radio" name="journey_purpose" value="3" <?= (@$info->journey_purpose==3)?'checked':''?>/> Visiting Family or Friends / 探亲访友<br>
            <input type="radio" name="journey_purpose" value="4" <?= (@$info->journey_purpose==4)?'checked':''?>/> Cultural / 文化 
			<input type="radio" name="journey_purpose" value="5" <?= (@$info->journey_purpose==5)?'checked':''?>/> Sports / 体育 
			<input type="radio" name="journey_purpose" value="6" <?= (@$info->journey_purpose==6)?'checked':''?>/> Official visit / 官方访问<br>
            <input type="radio" name="journey_purpose" value="7" <?= (@$info->journey_purpose==7)?'checked':''?>/> Medical reasons / 医疗 
			<input type="radio" name="journey_purpose" value="8" <?= (@$info->journey_purpose==8)?'checked':''?>/> Study / 学习 
			<input type="radio" name="journey_purpose" value="9" <?= (@$info->journey_purpose==9)?'checked':''?>/> Transit / 过境<br>
            <input type="radio" name="journey_purpose" value="10" <?= (@$info->journey_purpose==10)?'checked':''?>/> Airport transit / 机场过境<br>
            <input type="radio" name="journey_purpose" value="0" <?= (@$info->journey_purpose==0)?'checked':''?>/> Other (please specify) / 其它 (请注明）
			<input type="text" name="journey_purpose_other" value="<?= @$info->journey_purpose_other?>" /></td>
        </tr>

        <tr class="odd">
            <td>Member State (s) of destination <br> 
            申根目的地</td>
            <td><input type="text" name="destination_member_state" value="<?= @$info->destination_member_state?>" /></td>
            <td>&nbsp;</td>
            <td>Member State of first entry / 首入申根国</td>
            <td><input type="text" name="first_entry_member_state" value="<?= @$info->first_entry_member_state?>" /></td>
        </tr>
        <tr class="even">
            <td>Number of entries requested <br>
            申请入境次数</td>
            <td>
			<input type="radio" name="entry_num" value="1" <?= (@$info->entry_num==1)?'checked':''?> /> Single entry / 一次 
			<input type="radio" name="entry_num" value="2" <?= (@$info->entry_num==2)?'checked':''?> /> Two entries / 两次
			<input type="radio" name="entry_num" value="3" <?= (@$info->entry_num==3)?'checked':''?> /> Multiple entries / 多次 
			</td>
            <td>&nbsp;</td>
            <td>Duration of the intended stay or transit Indicate number of days<br />预计逗留或过境日数</td>
            <td><input type="text" name="stay_days" value="<?= @$info->stay_days?>" /></td>
        </tr>
        <tr class="odd">
            <td>Schengen visas issued during the past three years <br> 
            过去三年获批的申根签证</td>
            <td colspan="4">
			<input type="radio" name="is_visas_past_3year" value="0" <?= (@$info->is_visas_past_3year==0)?'checked':''?>/> No / 没有<br>
            <input type="radio" name="is_visas_past_3year" value="1" <?= (@$info->is_visas_past_3year==1)?'checked':''?>/> Yes. Date (s) of validity from有效期由<input type="text" name="visas_validity_from" value="<?= @$info->visas_validity_from?>" id="visas_validity_from"/> to 至<input type="text" name="visas_validity_to" value="<?= @$info->visas_validity_to?>" id="visas_validity_to"/></td>
        </tr>
        <tr class="even">
            <td>Fingerprints collected previously for the purpose of applying for a Schengen visa <br>
            以往申请申根签证是否有指纹纪录</td>
            <td colspan="4">
			<input type="radio" name="is_fingerprint" value="0" <?= (@$info->is_fingerprint==0)?'checked':''?>/> No / 没有 <br />
			<input type="radio" name="is_fingerprint" value="1" <?= (@$info->is_fingerprint==1)?'checked':''?>/> Yes 有 …………………Date, if known / 如有，请写明日期<input type="text" name="fingerprint_date" value="<?= @$info->fingerprint_date?>" id="fingerprint_date"/></td>
        </tr>
        <tr class="odd">
            <td>Entry permit for the final country of destination, where applicable <br>
            最后目的地之入境许可</td>
            <td colspan="4">
			Issued by 签发机关<input type="text" name="final_country_issued_by" value="<?= @$info->final_country_issued_by?>"/> 
			Valid from 有效期由<input type="text" name="final_country_issued_from" value="<?= @$info->final_country_issued_from?>" id="final_country_issued_from"/> 
			until 至<input type="text" name="final_country_issued_to" value="<?= @$info->final_country_issued_to?>" id="final_country_issued_to"/></td>
        </tr>
        <tr class="even">
            <td>Intended date of arrival in the Schengen area<br>
            预定入境申根国日期</td>
            <td><input type="text" name="intended_arrival_date" value="<?= @$info->intended_arrival_date?>" id="intended_arrival_date"/></td>
            <td>&nbsp;</td>
            <td>Intended date of departure from the Schengen area<br>
            预定离开申根国日期</td>
            <td><input type="text" name="intended_departure_date" value="<?= @$info->intended_departure_date?>" id="intended_departure_date"/></td>
        </tr>
        <tr class="odd">
            <td colspan="3">*31. Surname and first name of the inviting person (s) in the Member State (s).<br> 
              If not applicable, name of hotel (s) or temporary accommodation (s) in the Member States (s)<br>
              申根国的邀请人姓名。如无邀请人， 请填写申根国的酒店或暂住居所名称</td>
			<td colspan="2">inviting person:
			  <input type="text" name="inviting_person" value="<?= @$info->inviting_person?>"/></td>
        </tr>
        <tr class="even">
            <td colspan="3">Address and e-mail address of inviting person (s) / hotel (s) / temporary accommodation (s) <br>
			邀请人/酒店/暂住居所的地址及电字邮件</td>
            <td colspan="2">address:<input type="text" name="inviting_person_address" value="<?= @$info->inviting_person_address?>" /><br>
			email: 
			  <input type="text" name="inviting_person_email" value="<?= @$info->inviting_person_email?>" id="inviting_person_email"/>
			</td>
        </tr>
        <tr class="odd">
            <td colspan="3">Telephone and telefax <br>
            电话 及 传真号码</td>
            <td colspan="2">telephone:<input type="text" name="inviting_person_telephone" value="<?= @$info->inviting_person_telephone?>"/><br>
              fax:<input type="text" name="inviting_person_fax" value="<?= @$info->inviting_person_fax?>"/></td>
        </tr>
        <tr class="even">
            <td>*32. Name and address of inviting company / organization<br>
            邀请公司或机构名称及地址</td>
            <td>
			inviting company name:<input type="text" name="inviting_company" value="<?= @$info->inviting_company?>"/><br>
			inviting company address:<input type="text" name="inviting_company_address" value="<?= @$info->inviting_company_address?>"/>			</td>
            <td>&nbsp;</td>
            <td>Telephone and telefax of company / organisation <br>
            邀请方电话及传真号码</td>
            <td>
			inviting company telephone:<input type="text" name="inviting_company_telephone" value="<?= @$info->inviting_company_telephone?>"/><br>
			inviting company fax: <input type="text" name="inviting_company_fax" value="<?= @$info->inviting_company_fax?>"/>			</td>
        </tr>
        <tr class="odd">
            <td colspan="2">Surname, first name, address, telephone, telefax, and e-mail address of contact person in company / organisation<br>
            邀请公司/机构的联系人姓名、地址、电话、传真及电子邮件</td>
            <td colspan="3">contact name:<input type="text" name="inviting_company_contact" value="<?= @$info->inviting_company_contact?>" /><br>
              contact address: <input type="text" name="inviting_company_contact_address" value="<?= @$info->inviting_company_contact_address?>" /><br>
              contact telephone:<input type="text" name="inviting_company_contact_telephone" value="<?= @$info->inviting_company_contact_telephone?>" /><br>
              contact fax:<input type="text" name="inviting_company_contact_fax" value="<?= @$info->inviting_company_contact_fax?>" /><br>
              contact email: <input type="text" name="inviting_company_email" value="<?= @$info->inviting_company_email?>" id="inviting_company_email" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">*33. Cost of traveling and living during the applicant’s stay is covered
            旅费以及在国外停留期间的生活费用</td>
        </tr>
        <tr class="odd">
            <td colspan="2"><input type="radio" name="cost_by" value="1" <?= (@$info->cost_by==1)?'checked':''?>/> by the applicant himself/herself / 由申请人支付
			<hr />
              Means of support / 支付方式
			  <br />
              <input type="radio" name="cost_type" value="1" <?= (@$info->cost_by==1 && @$info->cost_type==1)?'checked':''?>/> Cash / 现金<br>
              <input type="radio" name="cost_type" value="2" <?= (@$info->cost_by==1 && @$info->cost_type==2)?'checked':''?>/> Traveller’s cheques / 旅行支票<br>
              <input type="radio" name="cost_type" value="3" <?= (@$info->cost_by==1 && @$info->cost_type==3)?'checked':''?>/> Credit card / 信用卡<br>
              <input type="radio" name="cost_type" value="4" <?= (@$info->cost_by==1 && @$info->cost_type==4)?'checked':''?>/> Prepaid accommodation / 预缴住宿<br>
              <input type="radio" name="cost_type" value="5" <?= (@$info->cost_by==1 && @$info->cost_type==5)?'checked':''?>/> Prepaid transport / 预缴交通<br>
              <input type="radio" name="cost_type" value="0" <?= (@$info->cost_by==1 && @$info->cost_type==0)?'checked':''?>/> Other (please specify) / 其它(请注明)
			  <input type="text" name="cost_type_other" value="<?= (@$info->cost_by==1)?@$info->cost_type_other:''?>"/>			  </td>
            <td>&nbsp;</td>
            <td colspan="2"><input type="radio" name="cost_by" value="2" <?= (@$info->cost_by==2)?'checked':''?>/> 
              by a sponsor (host, company, organisation), please
              Specify / 由赞助人（邀请人、公司或机构）支付，
              请注明
			  <hr />
              <input type="radio" name="cost_sponsor_type" value="1" <?= (@$info->cost_sponsor_type==1)?'checked':''?>/> referred to in field 31 or 32 / 参照字段31 及32<br>
              <input type="radio" name="cost_sponsor_type" value="0" <?= (@$info->cost_sponsor_type==0)?'checked':''?>/> other (please specify) / 其它 (请注明)
			  <input type="text" name="cost_sponsor_type_other" value="<?= @$info->cost_sponsor_type_other?>" />
			  <hr />
              Means of support / 支付方式<br>
              <input type="radio" name="cost_type" value="1" <?= (@$info->cost_by==2 && @$info->cost_type==1)?'checked':''?>/> Cash / 现金<br>
              <input type="radio" name="cost_type" value="2" <?= (@$info->cost_by==2 && @$info->cost_type==2)?'checked':''?>/> Accommodation provided / 提供住宿<br>
              <input type="radio" name="cost_type" value="3" <?= (@$info->cost_by==2 && @$info->cost_type==3)?'checked':''?>/> All expenses covered during the stay / 支付旅程期间所有开支<br>
              <input type="radio" name="cost_type" value="4" <?= (@$info->cost_by==2 && @$info->cost_type==4)?'checked':''?>/> Prepaid transport / 预缴交通<br>
              <input type="radio" name="cost_type" value="0" <?= (@$info->cost_by==2 && @$info->cost_type==0)?'checked':''?>/> Other (please specify) / 其它(请注明)
			  <input type="text" name="cost_type_other" value="<?= (@$info->cost_by==2)?@$info->cost_type_other:''?>"/>			  </td>
        </tr>
        <tr class="even">
            <td colspan="5">34. Personal data of the family member who is an EU, EEA or CH citizen 
            家庭成员为欧盟、欧洲经济区或瑞士公民，请填写其个人信息</td>
        </tr>
        <tr class="odd">
            <td>Surname
            姓</td>
            <td><input type="text" name="eu_surname" value="<?= @$info->eu_surname?>"/></td>
            <td>&nbsp;</td>
            <td>First name(s)
            名</td>
            <td><input type="text" name="eu_firstname" value="<?= @$info->eu_firstname?>"/></td>
        </tr>
        <tr class="even">
            <td>Date of birth / 出生日期</td>
            <td>
			
			日<select name="eu_birth_d"><option value='0'></option><?php for($i=1;$i<=31;$i++) echo "<option value='$i'".((@$info->eu_birth_d==$i)?"selected":"").">$i</option>"; ?></select> 
			月<select name="eu_birth_m"><option value='0'></option><?php for($i=1;$i<=12;$i++) echo "<option value='$i'".((@$info->eu_birth_d==$i)?"selected":"").">$i</option>"; ?></select> 
			年<select name="eu_birth_y"><option value='0'></option><?php for($i=2011;$i>1940;$i--) echo "<option value='$i'".((@$info->eu_birth_d==$i)?"selected":"").">$i</option>"; ?></select>			</td>
            <td>&nbsp;</td>
            <td>Nationality / 国籍</td>
            <td><input type="text" name="eu_nationality" value="<?= @$info->eu_nationality?>"/></td>
        </tr>
        <tr class="odd">
            <td colspan="2">Number of travel document or ID card
            旅行证件或身分证编号</td>
            <td colspan="3"><input type="text" name="eu_id_card" value="<?= @$info->eu_id_card?>"/></td>
        </tr>
        <tr class="even">
            <td colspan="5">35. Family relationship with an EU, EEA or CH citizen 申请人与欧盟、欧洲经济区或瑞士公民的关系</td>
        </tr>
        <tr class="odd">
            <td colspan="5">
			<input type="radio" name="eu_relationship" value="1" <?= (@$info->eu_relationship==1)?'checked':''?>/> spouse 配偶 
			<input type="radio" name="eu_relationship" value="2" <?= (@$info->eu_relationship==2)?'checked':''?>/> child 子女 
			<input type="radio" name="eu_relationship" value="3" <?= (@$info->eu_relationship==3)?'checked':''?>/> grandchild 孙儿女 
			<input type="radio" name="eu_relationship" value="4" <?= (@$info->eu_relationship==4)?'checked':''?>/> dependent ascendant 受养人</td>
        </tr>
    </tbody>
	</table>
<!-- table end -->
</form>

			</div>
		</div>
		
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

<script type="text/javascript">
$().ready(function() {
  $("#form").validate({
    rules: {
		surname: {
		 required:true
		},
		firstname: {
		 required:true
		},
		sex:{
		 required:true
		},
		marital_status:{
		 required:true
		},
		national_id:{
		 required:true,
		 rangelength:[10,30]
		},
		travel_document_type:{
		 required:true
		},
		is_residence:{
		 required:true
		},
		journey_purpose:{
		 required:true
		},
		entry_num:{
		 required:true
		},
		is_visas_past_3year:{
		 required:true
		},
		is_fingerprint:{
		 required:true
		},
		cost_by:{
		 required:true
		},
		cost_type:{
		 required:true
		}
    }
  });
  
	$( "#travel_document_issue_date" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true

	});
	$( "#travel_document_valid_date" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	$( "#residence_other_valid_date" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});

	$( "#visas_validity_from" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	$( "#visas_validity_to" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	$( "#fingerprint_date" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	$( "#final_country_issued_from" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	$( "#final_country_issued_to" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	$( "#intended_arrival_date" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	$( "#intended_departure_date" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	
	$("#applicant_email").autoMail();
	$("#inviting_person_email").autoMail();
	$("#inviting_company_email").autoMail();

	$("#printInfo").click(function(o) {
		var prints = [
			{rel_id: <?=$cateid?>, rec_id: <?=$id?>}
		]  ;
		
		var jdata = JSON.stringify(prints);
		//alert(jdata);
		$.post("<?=site_url('proxy/does/'.str_replace('==','',base64_encode('http://'.$_SERVER['SERVER_NAME'].':9090/javaprduct/servlet/test')))?>",{clients:jdata},function(msg){alert(msg)});
	});
	
	$("#printInfo").ajaxError(function(event,request, settings){
		//$(this).append("<li>出错页面:" + settings.url + "</li>");
		alert("无法访问"+ settings.url );
	}); 
 
});
</script>

<?=$this->load->view('include_footer',null)?>